<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en"><!--<![endif]--><!-- BEGIN HEAD --><head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">

	<meta charset="utf-8">

	<title>{$config.title|default='主页'}</title>

	<meta content="width=device-width, initial-scale=1.0" name="viewport">

	<meta content="" name="description">

	<meta content="" name="author">

	<!-- BEGIN GLOBAL MANDATORY STYLES -->

	<link href="__PUBLIC__/Kuang/css/bootstrap.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/bootstrap-responsive.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/font-awesome.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/style-metro.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/style.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/style-responsive.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/light.css" rel="stylesheet" type="text/css" id="style_color">

	<link href="__PUBLIC__/Kuang/css/uniform.css" rel="stylesheet" type="text/css">

	<!-- END GLOBAL MANDATORY STYLES -->

	<!-- BEGIN PAGE LEVEL STYLES -->

	<link href="__PUBLIC__/Kuang/css/profile.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/select2_metro.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/DT_bootstrap.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/bootstrap-wysihtml5.css" rel="stylesheet" type="text/css">

	<link href="__PUBLIC__/Kuang/css/datepicker.css" rel="stylesheet" type="text/css">
	<link href="__PUBLIC__/Kuang/css/jquery.css" rel="stylesheet" type="text/css">


	<!-- 引入layer及表单验证方法 -->
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.2.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-2.1.1.min.js"></script>

	<script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>
	<script src="__PUBLIC__/js/jquery.validate.min.js"></script>
	<script src="__PUBLIC__/js/messages_zh.min.js"></script>
	<script src="__PUBLIC__/js/base.js"></script>

	<!-- 引入layer及表单验证方法 -->
	<!-- END PAGE LEVEL STYLES -->

	<link rel="shortcut icon" href="__PUBLIC__/favicon.ico">

</head>
<style>
	.main{
		background-color: #000 !important;
	}

	.form-bg{
		margin-bottom: 0em !important;
		width: 40%;
		background-color: #fff;
		border-radius: 1.5% !important;
		box-shadow: inset;
		margin: 0 auto;
	}
	.mar{
		-webkit-margin-before: 0.83em;
		-webkit-margin-after: 0em;
		padding: 30px 0;
	}
	.text_c{
		text-align: center;
	}
	.form-horizontal .control-label {
		float: left;
		width: 20%;
		padding-top: 0;
		text-align: right;
		padding: 14px;
	}
	.form-group input{
		width: 65%;
	}
	.form-group input[type=radio]{
		width: 7%;
	}
	.clear{
		clear: both;
	}
	a:hover{text-decoration:none;}
</style>
<!-- END HEAD -->

<!-- BEGIN BODY -->

<body class="page-header-fixed page-full-width">
		<!-- start: Content -->
		<div class="main">

			<div class="row">	
				
				<div class="col-sm-12">
					<div class="panel panel-inverse">
                        <div class="panel-body">
                        <div class="panel-form">
                         <form class="form-horizontal form-bordered" method = "post"  data-validate="parsley">
                            <div class="form-horizontal form-bordered form-bg">
								<h2 class=" mar text_c"><strong>会员注册</strong></h2>
								<div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>用户名 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input class="form-control parsley-validated" id="uname" data-required="true" data-type="dateIso" placeholder="" type="text" name="uname">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>登录密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="pwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="pwd">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>确认登录密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="twopwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="twopwd">
									</div>
								</div>
                               <!--  <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>二级密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="topwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="topwd">
									</div>
                                    
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>确认二级密码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="twotopwd" data-required="true" data-type="dateIso" placeholder="" type="password" name="twotopwd">
									</div>
								</div> -->
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>推荐人 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="tuijianid" data-required="true" data-type="dateIso" placeholder="" type="text" name="tuijianid">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>接点人 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="jiedianid" data-required="true" data-type="dateIso" placeholder="" type="text" name="jiedianid">
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>分支 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input type="radio"  name="quyu" id="quyu" value="left" />左区
										<input type="radio"  name="quyu" id="quyu2" value="righ" />右区
									</div>
								</div>
                                <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>姓名 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="fullname" data-required="true" data-type="dateIso" placeholder="" type="text" name="fullname"  >
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>身份证号 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="shenfenzheng" data-required="true" data-type="dateIso" placeholder="" type="text" name="shenfenzheng" >
									</div>
								</div>
                                <div class="form-group">
									<div class="control-label col-md-4 ui-sortable"><label>性别 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
										<input type="radio" name="sex" id="sex" value="1" />男
										<input type="radio" name="sex" id="sex2" value="2" />女
									</div>
								</div>
                                
                                <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>手机号 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="form-control parsley-validated" id="tel" data-required="true" data-type="dateIso" placeholder="" type="text" name="tel">
									</div>
								</div>
								 <div class="form-group clear">
									<div class="control-label col-md-4 ui-sortable"><label>验证码 :</label></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                       <input class="wid" type="text" name="code" id="code" required="required" placeholder="请输入验证码"><input  onclick="sandPhone()" type="button"  value="发送验证码" />
									</div>
								</div>





                                 <div class="form-group">
									<div class="control-label col-md-4 ui-sortable" style="padding:30px;"></div>
									<div class="col-md-8 ui-sortable" style="padding:14px;">
                                      
                                      <input type="button" style=" border-radius: 4px !important; width: 25%; padding:7px 40px;" onClick="sub()" class="btn btn-danger" value="提交">
                                      <!-- <input type="button" style=" border-radius: 4px !important; width: 50%; padding:7px 40px;" onClick="fanhui()" class="btn btn-danger" value="返回"> -->
                                      <a href="{:U('Login/index')}" style="color: #333333 !important;
    background-color: #E5E5E5 !important; border-radius: 4px !important; width: 35%; padding:9.5px 74px;">返回</a>
									</div>
								</div>
							</div>
                            </form>
                        </div>
                       
                       
			       
                    </div>
                    </div>
					
				</div><!--/col-->				
			
			</div><!--/.row-->
		</div>
		<!-- end: Content -->
</body>
<script>
	//验证码
	function sandPhone(){
		var phone = $('#tel').val();
		if(phone==""){
			layer.msg("请输入手机号", {
			 		time: 1500, 
				});	
		}
		var url = "{:U('Reg/sendPhone')}";
		$.post(url,{'phone':phone},function(data){
			layer.msg(data.info, {
			 		time: 1500, 
				});
	 	});
	}
	function sub(){
			var url="{:U('Reg/add')}";
			var quyu = $('input[name="quyu"]:checked').val();
			var sex = $('input[name="sex"]:checked').val();
			var uname = $("#uname").val();
			var pwd = $("#pwd").val();
			var twopwd = $("#twopwd").val();
			// var topwd = $("#topwd").val();
			// var twotopwd = $("#twotopwd").val();
			var tuijianid = $("#tuijianid").val();
			var jiedianid = $("#jiedianid").val();
			var fullname = $("#fullname").val();
			var shenfenzheng = $("#shenfenzheng").val();
			var tel = $("#tel").val();
			var code = $("#code").val();
			if(pwd==""||uname==""||pwd==""||twopwd==""||tuijianid==""||jiedianid==""||fullname==""||shenfenzheng==""||tel==""||code==""){
				layer.msg("请补全信息", {
			 		time: 1500, 
				});	
				return;
			}
			if(quyu==null){
				layer.msg("请选择分支", {
			 		time: 1500, 
				});	
				return;
			}
			if(sex==null){
				layer.msg("请选择性别", {
			 		time: 1500, 
				});	
				return;
			}
			if(code==""){
				layer.msg("请输入验证码", {
			 		time: 1500, 
				});
				return;
			}
			$.post(url,{'uname':uname,'pwd':pwd,'twopwd':twopwd,'tuijianid':tuijianid,'jiedianid':jiedianid,'fullname':fullname,'shenfenzheng':shenfenzheng,'tel':tel,'code':code,'quyu':quyu,'sex':sex},function(data){
				if(data.status<0){
					layer.msg(data.info);		
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				        window.location.href=""
				    }, 2000);
					
				}
			
			});	
		}

		// function fanhui(){
		// 	location.href = "{:U('Login/index')}";
		// }

</script>